using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_RuleVsFlowNodeMap : EntityTypeConfiguration<FMS_RuleVsFlowNode>
	{
		public FMS_RuleVsFlowNodeMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.Condition)
				.IsRequired()
				.HasMaxLength(100);
				
			// Table & Column Mappings
			this.ToTable("FMS_RuleVsFlowNode");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.NodeID).HasColumnName("NodeID");
			this.Property(t => t.RuleID).HasColumnName("RuleID");
			this.Property(t => t.Condition).HasColumnName("Condition");
		}
	}
}

